//
//  FilterContentView.m
//  History
//
//  Created by 张娇娇 on 16/9/8.
//  Copyright © 2016年 kane. All rights reserved.
//

#import "FilterContentView.h"

@implementation FilterContentView

{
    NSInteger selectNum;
}

- (IBAction)tapHandle:(id)sender
{
    [self removeFromSuperview];
}

- (IBAction)buttonClick:(UIButton *)sender
{
    sender.selected = !sender.selected;
    if (sender.selected) {
        selectNum++;
        [sender drawBorderColor:[UIColor colorWithRed:239/255.0 green:239/255.0 blue:244/255.0 alpha:1] Width:0.5];
    }else{
        selectNum--;
        [sender drawBorderColor:[UIColor lightGrayColor] Width:0.5];
    }
    if (selectNum > 0) {
        [_shieldBtn setTitle:@"确认屏蔽" forState:UIControlStateNormal];
    }else if (selectNum == 0) {
        [_shieldBtn setTitle:@"不感兴趣" forState:UIControlStateNormal];
    }
}

- (IBAction)shieldBtnClick:(UIButton *)sender
{
    if (self.delegate && [self.delegate respondsToSelector:@selector(clickShieldButton:)]) {
        [self.delegate clickShieldButton:_dataIndex];
    }
}


@end
